package com.wf.course.model.goods;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.Transient;

public class GoodsOrder {
	
	  private Integer id; //自增主键
	  private String  orderCode; //订单编号（dd+年月日时分秒）
	  private String  orderTime; //订单生成时间
	  private Integer payType; //订单支付方式（1.微信支付 2.）
	  private Integer orderStatus; //订单状态（1.待付款2.待收货3.待评价4.已完成5.取消订单）
	  private Integer userId; //订单所属用户编号
	  private String  recipient; //接收人
	  private String  recipientPhone; //接收人电话
	  private String  recipientAddress; //接收人地址
	  private String  recipientPcd; //接收人省市区
	  private String  postCode; //邮政编码
	  private String  freight; //运费
	  private String  goodsAmount; //商品总金额
	  private String  orderAmount; //订单总金额
	  private String copperCash; //使用铜钱
	  private String userSource;//用户来源
	  private String transaction_id;//微信支付订单号
	  private String remark;//备注-配置订单备注说明
	  private String  orderPayTime; //订单支付时间
	  private String  orderRemark; //订单备注
	  private Integer coupons_id;//优惠券ID
	  private String coupons_memo;//优惠券使用说明
	  private String spendCoin;//订单花费铜钱数
	  private String backTime;//退货时间
	  private String activityInfo;//优惠信息
	  
	  
	  private String  orderBeginTime; //订单生成时间
	  private Integer orderType;//订单类别
	  private String userName; //用户名
	  private String telephone;//用户手机
	  private Integer dayCount;//统计订单每日总数
	  private String  orderEndTime; //订单生成结束时间
	  private BigDecimal  totalAmount; //所有订单实际支付总金额
	  private String title;//优惠券标题
	  
	  
	  private String goodsInfoStr; //商品信息字符串，用于导出excel文件时，展示
	  private BigDecimal courseInfoAmount;//每条订单中课程总金额，用于导出excel文件时，展示
	  private BigDecimal goodsInfoAmount;//每条订单中商品总金额 ，用于导出excel文件时，展示
	  private String courseDetailStr;//每个订单中课程详情，用于导出excel文件时，展示
	  private String goodsDetailStr;//每个订单中，商品详情， 用于导出excel文件时，展示
	  
	  private String oldCopperCash;//原铜钱
	  private String newCopperCash;//新铜钱
	  private String gold;//金币
	  private String newGold;//新金币
	  private String version;//版本号
	  @Transient 
	  private String realPay;
	  @Transient 
	  private String activityCash;
	  @Transient
	  private String goodsNames; //商品名称
	  @Transient
	  private String cost;
	  @SuppressWarnings("unused")
	  private String detailAddress;//详细地址：接收人省市区+地址，用于导出excel文件时，展示
	  
	  private String  goodsName; //年卡名称，配置年卡时显示
	  
	  private String oldCopperCashs;//子表的原铜钱
	  private String newCopperCashs;//子表的新铜钱
	  private String golds;//子表金币
	  @Transient
	  private String identification;//标识字段 
	  
	  //定义子表集合
	  List<GoodsOrderRelation> m_OrderDetailList = new ArrayList<GoodsOrderRelation>();
			  
			  
	  public List<GoodsOrderRelation> getOrderDetailList() {
		return m_OrderDetailList;
	}

	public void setOrderDetailList(List<GoodsOrderRelation> m_OrderDetailList) {
		this.m_OrderDetailList = m_OrderDetailList;
	}

	public String getOrderBeginTime() {
			return orderBeginTime;
		}

		public void setOrderBeginTime(String orderBeginTime) {
			this.orderBeginTime = orderBeginTime;
		}

		public String getOrderEndTime() {
			return orderEndTime;
		}

		public void setOrderEndTime(String orderEndTime) {
			this.orderEndTime = orderEndTime;
		}

	  public String getOrderRemark() {
			return orderRemark;
		}

		public void setOrderRemark(String orderRemark) {
			this.orderRemark = orderRemark;
		}
		
	 

	public Integer getCoupons_id() {
			return coupons_id;
		}

		public void setCoupons_id(Integer coupons_id) {
			this.coupons_id = coupons_id;
		}

		public String getCoupons_memo() {
			return coupons_memo;
		}

		public void setCoupons_memo(String coupons_memo) {
			this.coupons_memo = coupons_memo;
		}
		

	public String getTitle() {
			return title;
		}

		public void setTitle(String title) {
			this.title = title;
		}

	

		public String getSpendCoin() {
			return spendCoin;
		}

		public void setSpendCoin(String spendCoin) {
			this.spendCoin = spendCoin;
		}

		public String getBackTime() {
			return backTime;
		}

		public void setBackTime(String backTime) {
			this.backTime = backTime;
		}

	public String getActivityInfo() {
			return activityInfo;
		}

		public void setActivityInfo(String activityInfo) {
			this.activityInfo = activityInfo;
		}

	public String getGoodsName() {
			return goodsName;
		}

		public void setGoodsName(String goodsName) {
			this.goodsName = goodsName;
		}

	public BigDecimal getCourseInfoAmount() {
			return courseInfoAmount;
		}

		public void setCourseInfoAmount(BigDecimal courseInfoAmount) {
			this.courseInfoAmount = courseInfoAmount;
		}

		public BigDecimal getGoodsInfoAmount() {
			return goodsInfoAmount;
		}

		public void setGoodsInfoAmount(BigDecimal goodsInfoAmount) {
			this.goodsInfoAmount = goodsInfoAmount;
		}

		public String getCourseDetailStr() {
			return courseDetailStr;
		}

		public void setCourseDetailStr(String courseDetailStr) {
			this.courseDetailStr = courseDetailStr;
		}

		public String getGoodsDetailStr() {
			return goodsDetailStr;
		}

		public void setGoodsDetailStr(String goodsDetailStr) {
			this.goodsDetailStr = goodsDetailStr;
		}

	public String getDetailAddress(){
		  
		 StringBuffer detailAdd =new StringBuffer();
		 if(getRecipientPcd()!=null && getRecipientAddress()!=null){
			 detailAdd.append(getRecipientPcd().trim()).append("-").append(getRecipientAddress());
		 }
		 
		 return  detailAdd.toString();	 
	  }
	  
	public void setDetailAddress(String detailAddress) {
		this.detailAddress = detailAddress;
	}


	  
	  public BigDecimal getTotalAmount() {
		return totalAmount;
	}
	public void setTotalAmount(BigDecimal totalAmount) {
		this.totalAmount = totalAmount;
	}
	
	  
	  public String getTelephone() {
		return telephone;
	}
	public Integer getDayCount() {
		return dayCount;
	}
	public void setDayCount(Integer dayCount) {
		this.dayCount = dayCount;
	}
	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}
	
	  
	public String getUserSource() {
		return userSource;
	}
	public void setUserSource(String userSource) {
		this.userSource = userSource;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getOrderPayTime() {
		return orderPayTime;
	}
	public void setOrderPayTime(String orderPayTime) {
		this.orderPayTime = orderPayTime;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getOrderCode() {
		return orderCode;
	}
	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}
	public String getOrderTime() {
		return orderTime;
	}
	public String getTransaction_id() {
		return transaction_id;
	}
	public void setTransaction_id(String transaction_id) {
		this.transaction_id = transaction_id;
	}
	public void setOrderTime(String orderTime) {
		this.orderTime = orderTime;
	}
	public Integer getPayType() {
		return payType;
	}
	public void setPayType(Integer payType) {
		this.payType = payType;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Integer getOrderStatus() {
		return orderStatus;
	}
	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public String getRecipient() {
		return recipient;
	}
	public void setRecipient(String recipient) {
		this.recipient = recipient;
	}
	public String getRecipientPhone() {
		return recipientPhone;
	}
	public void setRecipientPhone(String recipientPhone) {
		this.recipientPhone = recipientPhone;
	}
	public String getRecipientAddress() {
		return recipientAddress;
	}
	public void setRecipientAddress(String recipientAddress) {
		this.recipientAddress = recipientAddress;
	}
	public String getRecipientPcd() {
		return recipientPcd;
	}
	public void setRecipientPcd(String recipientPcd) {
		this.recipientPcd = recipientPcd;
	}
	public String getPostCode() {
		return postCode;
	}
	public void setPostCode(String postCode) {
		this.postCode = postCode;
	}
	public String getFreight() {
		return freight;
	}
	public void setFreight(String freight) {
		this.freight = freight;
	}
	public String getGoodsAmount() {
		return goodsAmount;
	}
	public void setGoodsAmount(String goodsAmount) {
		this.goodsAmount = goodsAmount;
	}
	public String getOrderAmount() {
		return orderAmount;
	}
	public void setOrderAmount(String orderAmount) {
		this.orderAmount = orderAmount;
	}
	public Integer getOrderType() {
		return orderType;
	}
	public void setOrderType(Integer orderType) {
		this.orderType = orderType;
	}
	public String getCopperCash() {
		return copperCash;
	}
	public void setCopperCash(String copperCash) {
		this.copperCash = copperCash;
	}
	public String getGoodsInfoStr() {
		return goodsInfoStr;
	}
	public void setGoodsInfoStr(String goodsInfoStr) {
		this.goodsInfoStr = goodsInfoStr;
	}
	
	public String getOldCopperCash() {
		return oldCopperCash;
	}

	public void setOldCopperCash(String oldCopperCash) {
		this.oldCopperCash = oldCopperCash;
	}

	public String getNewCopperCash() {
		return newCopperCash;
	}

	public void setNewCopperCash(String newCopperCash) {
		this.newCopperCash = newCopperCash;
	}

	public String getGold() {
		return gold;
	}

	public void setGold(String gold) {
		this.gold = gold;
	}
	

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}
	

	
	public String getRealPay() {
		return realPay;
	}

	public void setRealPay(String realPay) {
		this.realPay = realPay;
	}

	public String getActivityCash() {
		return activityCash;
	}

	public void setActivityCash(String activityCash) {
		this.activityCash = activityCash;
	}

	public String getGoodsNames() {
		return goodsNames;
	}

	public void setGoodsNames(String goodsNames) {
		this.goodsNames = goodsNames;
	}

	

	public String getCost() {
		return cost;
	}

	public void setCost(String cost) {
		this.cost = cost;
	}

	public String getOldCopperCashs() {
		return oldCopperCashs;
	}

	public void setOldCopperCashs(String oldCopperCashs) {
		this.oldCopperCashs = oldCopperCashs;
	}

	public String getNewCopperCashs() {
		return newCopperCashs;
	}

	public void setNewCopperCashs(String newCopperCashs) {
		this.newCopperCashs = newCopperCashs;
	}

	public String getGolds() {
		return golds;
	}

	public void setGolds(String golds) {
		this.golds = golds;
	}
	

	public String getIdentification() {
		return identification;
	}

	public void setIdentification(String identification) {
		this.identification = identification;
	}

	@Override
	public String toString() {
		return "GoodsOrder [id=" + id + ", orderCode=" + orderCode + ", orderTime=" + orderTime + ", payType=" + payType
				+ ", orderStatus=" + orderStatus + ", userId=" + userId + ", recipient=" + recipient
				+ ", recipientPhone=" + recipientPhone + ", recipientAddress=" + recipientAddress + ", recipientPcd="
				+ recipientPcd + ", postCode=" + postCode + ", freight=" + freight + ", goodsAmount=" + goodsAmount
				+ ", orderAmount=" + orderAmount + ", orderType=" + orderType + ", userName=" + userName + ", oldCopperCash=" + oldCopperCash + ", newCopperCash=" + newCopperCash + ", gold=" + gold + "]";
	}

	public String getNewGold() {
		return newGold;
	}

	public void setNewGold(String newGold) {
		this.newGold = newGold;
	}
}
